using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using SqlSugar;


#region Mantis Code Auto Generate Assistant Illustration V1.0
/// <summary>
/// Mantis 代码生成助手 V1.0
/// 设计依据：Sqlite的表格 fixed_assets_info
/// 非引用类对象，数字，字符，布尔等类型考虑到数据库，可能为空的情况，如果支持null类型，声明为：类型?
/// 非引用类对象，数字，字符，布尔等类型考虑到数据库，可能为空的情况，如果不支持null类型，声明为：类型
/// 非引用类对象，数字，字符，布尔等类型，如果不支持null类型，在自动转换时候数字会转换为0 字符为 '' 布尔为false
/// 对于数字主键，0是C#中的默认值，故要求数据库中不存在主键值为0的情况
/// 字段和属性为一一对应，属性为简单属性结构，属性Get,Set方法都是public，且未添加其他判断内容
/// 代码生成时间：2024年12月-05日 01时51分
/// <summary>
#endregion

namespace AccessibilityTools.DB
{
    public class Fixed_assets_info
    {
        #region Field[27]
        private int _id;

        private string _asset_num;

        private string _asset_class;

        private string _asset_name;

        private string _asset_type;

        private string _asset_brand;

        private string _asset_supplier;

        private string _asset_count;

        private string _asset_unit;

        private double? _unit_price;

        private string _price_unit_name;

        private string _price_tax;

        private double? _total_price;

        private string _user_name;

        private string _place_storage;

        private int? _is_used;

        private string _used_time;

        private string _inventory_result;

        private string _asset_notes;

        private int? _green_shield;

        private int? _is_printed;

        private string _printed_time;

        private int? _is_signed;

        private int? _isDeleted;

        private string _creation_time;

        private string _update_time;

        private string _buy_time;

        #endregion

        #region Property[27]
        /// <summary>
        /// 序号
        /// </summary>
        [SugarColumn(ColumnName = "id", IsIdentity = true, IsPrimaryKey = true)]
        public int Id
        { 
            set {_id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 资产编号
        /// </summary>
        [SugarColumn(ColumnName = "asset_num")]
        public string Asset_num
        { 
            set {_asset_num = value; }
            get { return _asset_num; }
        }
        /// <summary>
        /// 类别
        /// </summary>
        [SugarColumn(ColumnName = "asset_class")]
        public string Asset_class
        { 
            set {_asset_class = value; }
            get { return _asset_class; }
        }
        /// <summary>
        /// 资产名字
        /// </summary>
        [SugarColumn(ColumnName = "asset_name")]
        public string Asset_name
        { 
            set {_asset_name = value; }
            get { return _asset_name; }
        }
        /// <summary>
        /// 规格型号
        /// </summary>
        [SugarColumn(ColumnName = "asset_type")]
        public string Asset_type
        { 
            set {_asset_type = value; }
            get { return _asset_type; }
        }
        /// <summary>
        /// 品牌
        /// </summary>
        [SugarColumn(ColumnName = "asset_brand")]
        public string Asset_brand
        { 
            set {_asset_brand = value; }
            get { return _asset_brand; }
        }
        /// <summary>
        /// 供应商
        /// </summary>
        [SugarColumn(ColumnName = "asset_supplier")]
        public string Asset_supplier
        { 
            set {_asset_supplier = value; }
            get { return _asset_supplier; }
        }
        /// <summary>
        /// 数量
        /// </summary>
        [SugarColumn(ColumnName = "asset_count")]
        public string Asset_count
        { 
            set {_asset_count = value; }
            get { return _asset_count; }
        }
        /// <summary>
        /// 单位
        /// </summary>
        [SugarColumn(ColumnName = "asset_unit")]
        public string Asset_unit
        { 
            set {_asset_unit = value; }
            get { return _asset_unit; }
        }
        /// <summary>
        /// 单价
        /// </summary>
        [SugarColumn(ColumnName = "unit_price")]
        public double? Unit_price
        { 
            set {_unit_price = value; }
            get { return _unit_price; }
        }
        /// <summary>
        /// 价格单位
        /// </summary>
        [SugarColumn(ColumnName = "price_unit_name")]
        public string Price_unit_name
        { 
            set {_price_unit_name = value; }
            get { return _price_unit_name; }
        }
        /// <summary>
        /// 税额
        /// </summary>
        [SugarColumn(ColumnName = "price_tax")]
        public string Price_tax
        { 
            set {_price_tax = value; }
            get { return _price_tax; }
        }
        /// <summary>
        /// 合计价格
        /// </summary>
        [SugarColumn(ColumnName = "total_price")]
        public double? Total_price
        { 
            set {_total_price = value; }
            get { return _total_price; }
        }
        /// <summary>
        /// 使用人
        /// </summary>
        [SugarColumn(ColumnName = "user_name")]
        public string User_name
        { 
            set {_user_name = value; }
            get { return _user_name; }
        }
        /// <summary>
        /// 存放地点
        /// </summary>
        [SugarColumn(ColumnName = "place_storage")]
        public string Place_storage
        { 
            set {_place_storage = value; }
            get { return _place_storage; }
        }
        /// <summary>
        /// 资产使用情况
        /// </summary>
        [SugarColumn(ColumnName = "is_used")]
        public int? Is_used
        { 
            set {_is_used = value; }
            get { return _is_used; }
        }

        [SugarColumn(ColumnName = "used_time")]
        public string Used_time
        { 
            set {_used_time = value; }
            get { return _used_time; }
        }
        [SugarColumn(ColumnName = "inventory_result")]
        public string Inventory_result
        { 
            set {_inventory_result = value; }
            get { return _inventory_result; }
        }
        [SugarColumn(ColumnName = "asset_notes")]
        public string Asset_notes
        { 
            set {_asset_notes = value; }
            get { return _asset_notes; }
        }
        [SugarColumn(ColumnName = "green_shield")]
        public int? Green_shield
        { 
            set {_green_shield = value; }
            get { return _green_shield; }
        }
        [SugarColumn(ColumnName = "is_printed")]
        public int? Is_printed
        { 
            set {_is_printed = value; }
            get { return _is_printed; }
        }
        [SugarColumn(ColumnName = "printed_time")]
        public string Printed_time
        { 
            set {_printed_time = value; }
            get { return _printed_time; }
        }
        [SugarColumn(ColumnName = "is_signed")]
        public int? Is_signed
        { 
            set {_is_signed = value; }
            get { return _is_signed; }
        }
        [SugarColumn(ColumnName = "isDeleted")]
        public int? IsDeleted
        { 
            set {_isDeleted = value; }
            get { return _isDeleted; }
        }
        [SugarColumn(ColumnName = "creation_time")]
        public string Creation_time
        { 
            set {_creation_time = value; }
            get { return _creation_time; }
        }
        [SugarColumn(ColumnName = "update_time")]
        public string Update_time
        { 
            set {_update_time = value; }
            get { return _update_time; }
        }
        [SugarColumn(ColumnName = "buy_time")]
        public string Buy_time
        { 
            set {_buy_time = value; }
            get { return _buy_time; }
        } 

        #endregion

        #region Method [2]
        /// <summary>
        /// 通用方法关系转对象实例
        /// 需要注意对于未查询的属性值会自动转换为Null
        /// </summary>
        /// <param name="dr></param>
        /// <returns></returns>
        public static Fixed_assets_info RowToInstance(DataRow dr)
        { 
            Fixed_assets_info fixed_assets_info = new Fixed_assets_info();
            try
            {
                fixed_assets_info.Id = Convert.ToInt32(dr["id"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Asset_num = Convert.ToString(dr["asset_num"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Asset_class = Convert.ToString(dr["asset_class"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Asset_name = Convert.ToString(dr["asset_name"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Asset_type = Convert.ToString(dr["asset_type"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Asset_brand = Convert.ToString(dr["asset_brand"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Asset_supplier = Convert.ToString(dr["asset_supplier"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Asset_count = Convert.ToString(dr["asset_count"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Asset_unit = Convert.ToString(dr["asset_unit"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Unit_price = Convert.ToDouble(dr["unit_price"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Price_unit_name = Convert.ToString(dr["price_unit_name"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Price_tax = Convert.ToString(dr["price_tax"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Total_price = Convert.ToDouble(dr["total_price"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.User_name = Convert.ToString(dr["user_name"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Place_storage = Convert.ToString(dr["place_storage"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Is_used = Convert.ToInt32(dr["is_used"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Used_time = Convert.ToString(dr["used_time"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Inventory_result = Convert.ToString(dr["inventory_result"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Asset_notes = Convert.ToString(dr["asset_notes"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Green_shield = Convert.ToInt32(dr["green_shield"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Is_printed = Convert.ToInt32(dr["is_printed"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Printed_time = Convert.ToString(dr["printed_time"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Is_signed = Convert.ToInt32(dr["is_signed"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.IsDeleted = Convert.ToInt32(dr["isDeleted"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Creation_time = Convert.ToString(dr["creation_time"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Update_time = Convert.ToString(dr["update_time"]);
            }
            catch
            {
            }

            try
            {
                fixed_assets_info.Buy_time = Convert.ToString(dr["buy_time"]);
            }
            catch
            {
            }

            return fixed_assets_info;
        } 
        #endregion
    }
}
